Skip to content

Conversation

@richard-cox
Copy link
Member

@richard-cox richard-cox commented Oct 17, 2025

Summary

Fixes #15652

Occurred changes and/or fixed issues

  • vue watch --> handler: 'debouncedUpdateMatches', --> debouncedUpdateMatches: debounce(this.updateMatches, 500) seems broken in prod... but not dev
    -> yarn dev --> fine
    -> yarn start:prod --> fail
  • fix is just to unwrap it

Technical notes summary

  • handler: debounce(this.updateMatches, 500), would have been neater, however fails with this issues
  • handler: 'updateMatches', ==> works interestingly works, so it's just scenarios where a debounced function is stored as a variable. i've had a look where this happens and the file in the PR is the only one

Areas or cases that should be tested

Setup
Create a namespace and give it a unique name + label (for example aaa:aaa). Create a pod in that namespace and give it a unique label (for example bbb:bbb

  • Policy --> Network Policies --> Create
  • Ingress Rules --> check Configure ingress rules to restrict incoming traffic
  • click + --> click Add allowed traffic source
  • Test each of the following. After entering the required label key value the text showing selected resources should contain correct values
    • Namespace Label Selector
    • Pod Label Selector
    • Namespace/Pod Label Selector

Areas which could experience regressions

  • no other area should be affected

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

@richard-cox richard-cox added this to the v2.13.0 milestone Oct 17, 2025
@richard-cox richard-cox self-assigned this Oct 17, 2025
- vue watch -->  `handler:   'debouncedUpdateMatches'`, --> `debouncedUpdateMatches: debounce(this.updateMatches, 500)` seems broken in prod... but not dev
  -> yarn mem-dev --> fine
  -> yarn start:prod --> fail
- fix is just to unwrap it
- notes
  - `handler:   debounce(this.updateMatches, 500),` --> fails given `this` issues
  - `handler:   'updateMatches',` ==> works
  - i've had a look where we use debounced in data and use directly in watch handler... and these were the only places
@richard-cox richard-cox force-pushed the fix-network-policy-ns-selector branch from 47c65cb to 9bbbeed Compare October 20, 2025 11:29
@richard-cox richard-cox marked this pull request as ready for review October 21, 2025 10:15
@nwmac nwmac self-requested a review October 21, 2025 10:15
Copy link
Member

@nwmac nwmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@richard-cox richard-cox merged commit bb1ef45 into rancher:master Oct 21, 2025
96 of 101 checks passed
@richard-cox richard-cox deleted the fix-network-policy-ns-selector branch October 21, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Policy: Network Policies: The matching message does not display correctly

2 participants